git.iko.soy/rowtype-yoga/psfp
on 4a3f8f8 help sign in
65 lines 1.4 kB history raw
1module Shared.Models.Body where
3import Data.Maybe (Maybe(..))
5type CompileRequest
6 = { code ∷ String }
8-- type CompileResult
9-- = { result ∷ Array ErrorOrWarning
10-- , resultType :: String
11-- }
12type CompileResult
13 = { result ∷
14 Array
15 { allSpans ∷
16 Array
17 { end ∷ Array Int
18 , name ∷ String
19 , start ∷ Array Int
20 }
21 , errorCode ∷ String
22 , errorLink ∷ String
23 , filename ∷ String
24 , message ∷ String
25 , moduleName ∷ String
26 , position ∷
27 { endColumn ∷ Int
28 , endLine ∷ Int
29 , startColumn ∷ Int
30 , startLine ∷ Int
31 }
32 , suggestion ∷ Maybe Suggestion
33 }
34 , resultType ∷ String
35 }
37type RunResult
38 = { code ∷ Maybe Int, stdout ∷ String, stderr ∷ String }
40type Suggestion
41 = { replaceRange ∷ Position, replacement ∷ String }
43type Span
44 = { end ∷ Array Int
45 , name ∷ String
46 , start ∷ Array Int
47 }
49type Position
50 = { endColumn ∷ Int
51 , endLine ∷ Int
52 , startColumn ∷ Int
53 , startLine ∷ Int
54 }
56type ErrorOrWarning
57 = { allSpans ∷ Array Span
58 , errorCode ∷ String
59 , errorLink ∷ String
60 , filename ∷ String
61 , message ∷ String
62 , moduleName ∷ Maybe String
63 , position ∷ Position
64 , suggestion ∷ Maybe Suggestion
65 }