-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1214 from AttilaMihaly/add-instant-type-2
Added Instant module (originally implemented by Stephen Torku)
- Loading branch information
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{- | ||
Copyright 2020 Morgan Stanley | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-} | ||
|
||
|
||
module Morphir.IR.SDK.Instant exposing (..) | ||
|
||
import Dict | ||
import Morphir.IR.Documented exposing (Documented) | ||
import Morphir.IR.Module as Module exposing (ModuleName) | ||
import Morphir.IR.Name as Name | ||
import Morphir.IR.Path as Path exposing (Path) | ||
import Morphir.IR.SDK.Common exposing (toFQName) | ||
import Morphir.IR.Type exposing (Specification(..), Type(..)) | ||
|
||
|
||
moduleName : ModuleName | ||
moduleName = | ||
Path.fromString "Instant" | ||
|
||
|
||
moduleSpec : Module.Specification () | ||
moduleSpec = | ||
{ types = | ||
Dict.fromList | ||
[ ( Name.fromString "Instant" | ||
, OpaqueTypeSpecification [] | ||
|> Documented "Type that represents a specific instantaneous point on the timeline." | ||
) | ||
] | ||
, values = | ||
Dict.fromList | ||
[] | ||
, doc = Just "Contains the Instant type (representing a specific instantaneous point in time), and it's associated functions." | ||
} | ||
|
||
|
||
instantType : a -> Type a | ||
instantType attributes = | ||
Reference attributes (toFQName moduleName "Instant") [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{- | ||
Copyright 2020 Morgan Stanley | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-} | ||
|
||
|
||
module Morphir.SDK.Instant exposing (..) | ||
|
||
{-| This module adds the definition of an instantaneous point in time. | ||
@docs Instant | ||
-} | ||
|
||
import Time exposing (Posix) | ||
|
||
|
||
type alias Instant = | ||
Posix |