This file contains hidden or 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
%default total | |
data Prop = Var String | |
| Not Prop | |
| And Prop Prop | |
| Or Prop Prop | |
| Impl Prop Prop | |
| Equiv Prop Prop | |
data Lit = Stmt String | Neg String |
This file contains hidden or 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
atlantis-db/src/Atlantis/Database/Entities.hs:35:1: error: | |
• No instance for (Read Hash) | |
arising from the first field of ‘TransactionEntityKey’ | |
(type ‘Hash’) | |
Possible fix: | |
use a standalone 'deriving instance' declaration, | |
so you can specify the instance context yourself | |
• When deriving the instance for (Read (Key TransactionEntity)) | |
| | |
35 | share [mkPersist sqlSettings, mkMigrate "migrateTables"] [persistLowerCase| |
This file contains hidden or 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
atlantis-db/src/Atlantis/Database/Entities.hs:35:1: error: | |
• No instance for (Read Hash) | |
arising from the first field of ‘TransactionEntityKey’ | |
(type ‘Hash’) | |
Possible fix: | |
use a standalone 'deriving instance' declaration, | |
so you can specify the instance context yourself | |
• When deriving the instance for (Read (Key TransactionEntity)) | |
| | |
35 | share [mkPersist sqlSettings, mkMigrate "migrateTables"] [persistLowerCase| |
This file contains hidden or 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
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE ScopedTypeVariables#-} | |
{-# LANGUAGE TypeApplications#-} | |
{-# LANGUAGE TypeFamilies #-} | |
data ValueKind = First | Second deriving (Eq, Show) |
This file contains hidden or 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
extension Vector2D: Field {} |
This file contains hidden or 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
/// Protocol for addition with identity | |
protocol Additive { | |
static var addId: Self { get } | |
static func + (_ lhs: Self, _ rhs: Self) -> Self | |
} |
This file contains hidden or 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
// Ints are Multiplicative, the identity is 1 | |
extension Int: Multiplicative { | |
static var multId: Int { | |
return 1 | |
} | |
} |
This file contains hidden or 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
// Ints are Additive, the identity is 0 | |
extension Int: Additive { | |
static var addId: Int { return 0 } | |
} |
This file contains hidden or 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
/// Protocol for 2D coordinate systems | |
protocol TwoDimensions { | |
associatedtype ComponentVal | |
static func make2D(_ fst: ComponentVal, _ snd: ComponentVal) -> Self | |
var fst: ComponentVal { get } // The first component | |
var snd: ComponentVal { get } // The second component | |
} |
This file contains hidden or 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
/// Protocol for multiplication with identity | |
protocol Multiplicative { | |
static var multId: Self { get } | |
static func * (_ lhs: Self, _ rhs: Self) -> Self | |
} |